<!-- 特别修正综合查询=>辅助信息=>查询页面 -->
<template>
    <el-container class="electronicSignature">
        <el-main class="mainDetails">
            <TCollapse title="特别修正信息">
                <div class="searchPanel-content">
                    <el-table :data="tableData" style="width: 100%" border>
                        <el-table-column align="center" type="index" label="序号" width="50" />
                        <el-table-column v-for="item in configColumnsSearchList" :key="item.prop" :label="item.label"
                            show-overflow-tooltip :prop="item.prop" align="center" >
                            <template slot-scope="scope">
                                <span @click="skipInfo(scope.row, item)" class="header-tooltip"
                                    :style="{ color: item.prop === 'adjVersion' ? 'rgb(51, 170, 255)' : '#333', cursor: item.prop === 'adjVersion' ? 'pointer' : 'default' }">
                                    {{ scope.row[item.prop] }}
                                </span>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </TCollapse>
        </el-main>
    </el-container>
</template>

<script>
import { configColumnsSearchList } from '../option'
import { getQueryTableData } from '@/api/speciaCorrection/index.js'
export default {
    name: 'SpecialCorrectionList',
    data() {
        return {
            tableData: [
            ],
            configColumnsSearchList,
        }
    },
    methods: {
        skipInfo(row, item) {
            if (item.prop === 'adjVersion') {
                window.open(`${process.env.VUE_APP_ZHONGRUAN_URL}handleSpecialCorrection?prjId=${row.prjId}&adjustId=${row.adjustId}&processInstId=${row.processInstId}&type=1`, '_blank')
            }
        },
        async getTableData() {
            const { code, data } = await getQueryTableData({ prjCode: this.$route.query.prjCode })
            if (+code === 200) {
                this.tableData = data
            }
        }
    },
    created() {
        this.getTableData()
    }
}

</script>
<style lang="scss" scoped>
.electronicSignature {
    padding: 20px 45px;
    width: 100%;
}

.header-tooltip {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
</style>